package com.ruoyi.hospital.service.order.impl;

import java.util.List;

import com.ruoyi.hospital.domain.order.ShopOrdersProduct;
import com.ruoyi.hospital.mapper.order.ShopOrdersProductMapper;
import com.ruoyi.hospital.service.order.IShopOrdersProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 订单商品Service业务层处理
 * 
 * @author wendao
 * @date 2025-05-28
 */
@Service
public class ShopOrdersProductServiceImpl implements IShopOrdersProductService
{
    @Autowired
    private ShopOrdersProductMapper shopOrdersProductMapper;

    /**
     * 查询订单商品
     * 
     * @param id 订单商品主键
     * @return 订单商品
     */
    @Override
    public ShopOrdersProduct selectShopOrdersProductById(Integer id)
    {
        return shopOrdersProductMapper.selectShopOrdersProductById(id);
    }

    /**
     * 查询订单商品列表
     * 
     * @param shopOrdersProduct 订单商品
     * @return 订单商品
     */
    @Override
    public List<ShopOrdersProduct> selectShopOrdersProductList(ShopOrdersProduct shopOrdersProduct)
    {
        return shopOrdersProductMapper.selectShopOrdersProductList(shopOrdersProduct);
    }

    @Override
    public List<ShopOrdersProduct> selectShopOrdersProductListInorderids(List<Integer> orderIds) {
        return shopOrdersProductMapper.selectShopOrdersProductListInorderids(orderIds);
    }

    @Override
    public List<ShopOrdersProduct> selectShopOrdersProductListByorderids(Integer orderId,Integer storeId) {
        return shopOrdersProductMapper.selectShopOrdersProductListByorderids(orderId,storeId);
    }

    /**
     * 新增订单商品
     * 
     * @param shopOrdersProduct 订单商品
     * @return 结果
     */
    @Override
    public int insertShopOrdersProduct(ShopOrdersProduct shopOrdersProduct)
    {
        return shopOrdersProductMapper.insertShopOrdersProduct(shopOrdersProduct);
    }

    /**
     * 修改订单商品
     * 
     * @param shopOrdersProduct 订单商品
     * @return 结果
     */
    @Override
    public int updateShopOrdersProduct(ShopOrdersProduct shopOrdersProduct)
    {
        return shopOrdersProductMapper.updateShopOrdersProduct(shopOrdersProduct);
    }

    /**
     * 批量删除订单商品
     * 
     * @param ids 需要删除的订单商品主键
     * @return 结果
     */
    @Override
    public int deleteShopOrdersProductByIds(Integer[] ids)
    {
        return shopOrdersProductMapper.deleteShopOrdersProductByIds(ids);
    }

    /**
     * 删除订单商品信息
     * 
     * @param id 订单商品主键
     * @return 结果
     */
    @Override
    public int deleteShopOrdersProductById(Integer id)
    {
        return shopOrdersProductMapper.deleteShopOrdersProductById(id);
    }
}
